<?php declare(strict_types=1);
/**
 * @author      xianganyall <xianganyall@gmail.com>
 * @copyright   2023-2025 owner
 **/

namespace Srv\Libs\ConfModel;

final class ResponseConf extends ConfAbstract
{
    public const PREFIX                         = 'RESPONSE.';          // 配置前缀[必定点结尾]
    protected string $actionName                = '';                   // 请求参数名字[A]
    protected string $actionOrder               = '';                   // 请求参数顺序[G-get,P-post,S-server]
    protected int $actionRootNum                = 0;                    // 请求参数顺序[G-get,P-post,S-server]
    protected string $actionDefault             = '';                   // 请求空时的默认值[/index]
    protected string $groupNameWebsDefault      = '';                   // WEB请求空时的默认分组名
    protected string $groupNameSocksDefault     = '';                   // SOCKET请求空时的默认分组名
    protected string $allowMethodList           = '';                   // 允许请求的方法名[,分割][不区分大小写]

    /**
     * @param array $confData
     */
    public function __construct(array $confData)
    {
        $this->init($confData);
    }

    /**
     * @return string
     */
    public function getActionName(): string
    {
        return $this->actionName;
    }

    /**
     * @return string
     */
    public function getActionOrder(): string
    {
        return $this->actionOrder;
    }

    /**
     * @return int
     */
    public function getActionRootNum(): int
    {
        return $this->actionRootNum;
    }

    /**
     * @return string
     */
    public function getActionDefault(): string
    {
        return $this->actionDefault;
    }

    /**
     * @return string
     */
    public function getGroupNameWebsDefault(): string
    {
        return $this->groupNameWebsDefault;
    }

    /**
     * @return string
     */
    public function getGroupNameSocksDefault(): string
    {
        return $this->groupNameSocksDefault;
    }

    /**
     * @return string
     */
    public function getAllowMethodList(): string
    {
        return $this->allowMethodList;
    }
}